using System;
using System.Collections.Generic;
using iPhOwa.Exchange.ContentClasses;
using iPhOwa.Exchange.Managers;

namespace iPhOwa.Web.Controls
{
	public partial class ContactsContent : iPhOwaControl
	{
		/// <summary>
		/// Load event.
		/// </summary>
		protected void Page_Load(object sender, EventArgs e)
		{
			Folder currentFolder = FolderManager.Get(Path, OwaSession);

			if(currentFolder != null)
			{
				ICollection<Person> notes = PersonManager.GetList(Path, OwaSession);

				if(notes.Count > 0)
				{
					notesList.DataSource = notes;
					notesList.DataBind();
				}
				else
				{
					notesList.Visible = false;
					noMessagesPanel.Visible = true;
				}
			}
		}
	}
}